package demo1;

import java.util.Arrays;

public class Solution {
    public  String setstring (String str) {

        if(str == null | str.length() == 0) {
            return null;
        }

        char [] a = new char[26];
        int total = 0;

        int num = 0;
        for (int i = 0; i < str.length(); i++) {
            int flag = 0;
            char ch = str.charAt(i);
            for (int j = 0; j < i ; j++) {

                if(ch == a[j]) {
                    flag = 1;
                    break;
                }
            }
            if(flag == 0) {
                a[total] = ch ;
                total++;
                num++;
            }
        }
       StringBuilder b = new StringBuilder();
        for (int i = 0; i < num; i++) {
            b.append(a[i]);
        }
        return b.toString();
    }

    public static void main(String[] args) {
        Solution k = new Solution();
        String first = "asdasCc";
        System.out.println(k.setstring(first));
    }
}
